<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String gradeId=request.getParameter("gradeId");
%>

<!--  2010-07-06 添加班级 -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
		<title>添加班级</title>
	<link href="<%=path %>/css/index_css.css" rel="stylesheet" type="text/css" />
	<script language="javascript" src="<%=path %>/js/syAjax.js"></script>
	<script type="text/javascript">
	function doAdd()
	{
	  var name=document.getElementById("name");
	  if(name.value=="")
	  {
	    alert("班级名称不能为空！");
	    name.focus();
	    return;
	  }
	  syAjax.request("post","<%=path %>/saveClassGradeAndClassAction.action","classes.grade.gradeId=<%=gradeId %>&classes.name="+document.getElementById("name").value+"&classes.sort="+document.getElementById("sort").value+"&year=${currentYear}",{success:initSuccessResult,fail:onFail,type:'plain'});
	 	
	}
	
	function initSuccessResult(data){
		window.returnValue=data;
		window.close();
	}
	</script>

  </head>
  
  <body bgcolor="#ECE9D8">
  <form action="" name="classForm" method="post">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="41%" bgcolor="#ECE9D8">&nbsp;</td>
    <td width="59%" align="left" bgcolor="#ECE9D8">&nbsp;</td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#ECE9D8" class="f_6">班级名称：</td>
    <td align="left" bgcolor="#ECE9D8" class="f_6"><input type="text" name="classes.name" id="name" /></td>
  </tr>
  <tr>
    <td height="30" align="right" bgcolor="#ECE9D8"><span class="f_6">显示序号：</span></td>
    <td align="left" bgcolor="#ECE9D8" class="f_6"><input name="classes.sort" type="text" id="sort" value="0" /></td>
  </tr>
  <tr>
    <td colspan="2" align="center" bgcolor="#ECE9D8">&nbsp;</td>
  </tr>
  <tr>
    <td bgcolor="#ECE9D8">&nbsp;</td>
    <td height="40" align="left" bgcolor="#ECE9D8"><label>
      <input type="button" onclick="doAdd();" name="Submit" value="提 交" />
    </label></td>
  </tr>
 </table>
 </form>
  </body>
</html>
